#include <REGX52.H>
#include "MatrixKey.h"
#include "LCD1602.h"


void main()
{
	unsigned char KeyNum;
	
	LCD_Init();
	LCD_ShowString(1,1,"MatrxKey:");
	while(1)
	{
		KeyNum=ButtonDown();
		//注意，一定要加判断，否则在不按下的循环里面Key又被置零
		if(KeyNum)
			LCD_ShowNum(2,1,KeyNum,2);		
	}
	
	return;
}